public class Time {

	private int time, hundredths, seconds, minutes;
	
	//Constructor for a time object
	
	public Time(int setTime){
		time = setTime;
	}
	
	public void setTime(int setTime){
		time = setTime;
	}
	
	//This method takes time in hundredths of seconds, converts it into different pieces, and
	//returns it in a typical stopwatch format
	
	public String timeToString(){
		String timeString = "";
		String A, B, C;
		
		//Uses remainders to break up hundredths of seconds here
		
		minutes = (time - (time % 6000))/6000; 
		time = time % 6000; 

		seconds = (time - (time % 100))/100; 
		time = time % 100; 
		
		hundredths = time; 
		
		//Converts minutes into traditional stopwatch notation
		if (minutes < 10 && minutes > 0){
			A = ("0" + minutes + " : ");
		}
		else if (minutes == 0){
			A = ("00 : ");
		}
		else{
			A = (minutes + " : ");
		}
		
		//Same for seconds
		if (seconds < 10){
			B = ("0" + seconds);
		}
		else if (seconds == 0){
			B = ("00");
		}
		else{
			B = (Integer.toString(seconds));
		}
		
		//And now for hundredths of a second
		/*if (hundredths < 10){
			C = ("0" + hundredths);
		}
		else if (hundredths == 0){
			C = ("00");
		}
		else{
			C = (Integer.toString(hundredths));
		}*/
		
		timeString = (A + B);
		
		return timeString;
	}
}
